<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8;" />
<script type="text/javascript" src="/dqchat/Public/js/jquery-1.11.0.min.js" ></script>
<link href="/dqchat/Public/css/findpw/style.css" type="text/css" rel="stylesheet"></link>
<script>
$(function(){

     function setContent(str) {
str = str.replace(/<\/?[^>]*>/g,''); //去除HTML tag
str.value = str.replace(/[ | ]*\n/g,'\n'); //去除行尾空白
return str;
}
  
  $('#submit').click(function(){
 
     psw=setContent($("#psw").val());
    repsw= setContent($("#repsw").val());
	 from = $(".from").val()
	
     ifsubmit= true;
     $.ajax({
             type: "POST",
             url: "<?php echo U('changepsw');?>",
			 data: {from:from,psw:psw,repsw:repsw},
			 dataType: "text",
             success: function(data){
                 if(data==1){
						message = "密码不能为空";
					}else if(data==2){
						message = "密码必须是由6位或6位以上的英文字符加数字组成";
					}else if(data==3){
					message = "密码必须包含英文字符";
					}else if(data==4){
					message = "确认密码与输入的密码不一致";
					}else if(data==5){
					message = "验证通过";
					window.location.href="<?php echo U('findpwsu');?>";
					
					}
						alert(message);
			 
					               }
								   
			})	
 })
  
  })
</script></head>
<body>
<div class="menu">
<div class="home_menu1">

	<div class="home_menu2"><a href="<?php echo U('index');?>"><img src="/dqchat/Public/img/qidian/Hlogo.jpg" /></a></div>

	<div class="home_menu3"><a href="<?php echo U('index');?>">起点娱乐</a></div>

	<div class="home_menu4">
	  <ul>
		<li class="home_bk"><a href="/dqchat/index.php/Home/Index/index.html">首页</a ></li>

		<li class="home_bk"><a href ="/dqchat/download/setup.exe">下载中心</a></li>

		<li class="home_bk"><a href="/dqchat/index.php/Home/Index/rank/menu/2.html">人气排行</a></li>

		<li class="home_bk"><a href="/dqchat/index.php/Home/Index/worker/menu/3.html">虚拟商城</a></li>

		<li class="home_bk"><a href="/dqchat/index.php/Home/Index/worker/menu/4.html">个人中心</a></li>

		<li class="home_bk"><a href="/dqchat/index.php/Home/Index/worker/menu/5.html">加盟合作</a></li>
	  </ul>
	</div>

</div>
<div class="menu1">
<table>
<tr><td class="title">找回密码</td></tr>
<tr><td><image src="/dqchat/Public/img/findpw/line1.jpg"/></td></tr></table>
<table class="pwche_title1">
<tr><td class="pwche_title2" colspan=3>请输入新密码,重置成功后可使用新密码登录:</td></tr>
<tr><td class="pwche_password">新密码:</td><td class="pwche_text"><input type="password" name="psw" id="psw"></td></tr>
<tr><td class="pwche_password">确认新密码:</td><td class="pwche_text"><input type="password" name="repsw"id="repsw"></td></tr>
<tr><td></td><td class="pwche_sure" ><div id="submit" >确&nbsp&nbsp定</div></td></tr>
</table>
</div>
</div>
</body></html>